<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%String path = request.getContextPath(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="<%=path %>/js/echarts.js" charset="utf-8"></script>
<script type="text/javascript" src='<%=path%>/js/jquery-easyui-1.3.2/jquery-1.8.0.min.js'></script>

<script type="text/javascript">
var ec,theme;
require.config({
	paths:{
		echarts:"<%=path %>/js/charts"
	}
});
require(
		[
			"echarts",
			'echarts/chart/line',
			'echarts/chart/bar',
			'echarts/chart/scatter',
			'echarts/chart/k',
			'echarts/chart/pie',
			'echarts/chart/radar',
			'echarts/chart/force',
			'echarts/chart/chord',
			'echarts/chart/gauge',
            'echarts/chart/funnel',
            'echarts/chart/eventRiver',
			"echarts/chart/map"
		],
		function(e,t){
			ec=e;
			theme=t;
			DrawEChart(ec,theme);
		}
	);

function DrawEChart(ec,theme){
	DrawMap(ec,theme);
};
function DrawMap(ec,theme){
	chart = ec.init(document.getElementById("main"),theme);
	 var option = {
			    title : {
			        text: '入院/出院分布',
			        
			    },
			    tooltip : {
			        trigger: 'axis'
			    },
			    legend: {
			        data:['入院','出院']
			    },
			    toolbox: {
			        show : true,
			        feature : {
			            mark : {show: false},
			            dataView : {show: false, readOnly: false},
			            magicType : {show: true, type: ['line', 'bar']},
			            restore : {show: false},
			            saveAsImage : {show: true}
			        }
			    },
			    calculable : true,
			    xAxis : [
			        {
			            type : 'category',
			            data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value',name : '人数'
			        }
			    ],
			    series : [
			        {
			            name:'入院',
			            type:'bar',
			            data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6,10,5,4],
			            markPoint : {
			                data : [
			                    {type : 'max', name: '最大值'},
			                    {type : 'min', name: '最小值'}
			                ]
			            },
			            markLine : {
			                data : [
			                    {type : 'average', name: '平均值'}
			                ]
			            } 
			        },
			        {
			            name:'出院',
			            type:'bar',
			            data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
			            markPoint : {
			                data : [
			                    {type : 'max', name: '最大值'},
			                    {type : 'min', name: '最小值'}
			                ]
			            },
			            markLine : {
			                data : [
			                    {type : 'average', name: '平均值'}
			                ]
			            } 
			        }
			    ]
			};
		
			$.post(url,
					{},
					function(data,resultStatus){
						
					});
			                    
	
		chart.setOption(option);
	
}	






</script>
</head>
<body>
<div id="main" style="height:480px;"></div>
</body>
</html>